<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateTableArticleCategoryOperateHistory extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('article_category_operate_history', function (Blueprint $table) {
            $table->id();

            $table->unsignedBigInteger("targetId")->default(0)->comment("article_category.id");
            $table->unsignedTinyInteger("operateType")->default(0)->comment("操作类型");
            $table->unsignedTinyInteger("status")->default(0)->comment("操作状态");

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->unsignedTinyInteger("isDeleted")->default(0)->comment("是否删除");

            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = '专题 商家端 操作记录';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('article_category_operate_history');
    }
}
